< previous page page_498 next page >

Page 498
12181-0498a.gif
Figure 17.41.
Using the Common Dialog's Property Pages to
modify the help action properties.
After you add these controls, you next add the code needed to access the help system when a command button is clicked. The code in Listing 17.5 is all that's needed to access the help system. The code to close the application is also included.
LISTING 17.5. HELPEX1.TXTALL THE CODE REQUIRED TO ACCESS YOUR HELP SYSTEM.

8694cbadb9b1ef7075903f6f95fc1db2.gif
1: Const HelpFinder = &h00B
2: Private Sub cmdClose_Click()
3:     End
4: End Sub
5:
6: Private Sub cmdHelp_Click()
7:     dlgHelp.HelpCommand = HelpFinder
8:     dlgHelp.ShowHelp
9: End Sub

Note
The
HelpFinder command has replaced the HelpContents and HelpIndex commands to display the help file's contents topic and keyword index.
Also, for some reason known only to Microsoft, VB6 doesn't provide a Common Dialog control constant for the HelpFinder command. To access the contents topic in a help file, you must explicitly define the constant in your application's general area as follows:
Const HelpFinder = &h00B

Run the application and click the Help command button to display the Help Topic dialog box.

 
< previous page page_498 next page >

If you like this book, buy it!